<html>
<body>
Reports Kotlin properties that are not <code>const</code> and used as Java annotation arguments.
<p>
For example, a property with the <code>@JvmField</code> annotation has an initializer that can be evaluated at compile-time,
and it has a primitive or <code>String</code> type.
</p>

<p>
Such properties have a <code>ConstantValue</code> attribute in bytecode in Kotlin 1.1-1.2.
This attribute allows javac to fold usages of the corresponding field and use that field in annotations.
This can lead to incorrect behavior in the case of separate or incremental compilation in mixed Java/Kotlin code.
This behavior is subject to change in Kotlin 1.3 (no <code>ConstantValue</code> attribute any more).
</p>
<p><b>Example:</b></p>
<p>Kotlin code in foo.kt file:</p>
<pre><code>
  annotation class Ann(val s: String)
  @JvmField val importantString = "important"
</code></pre>
<p>Java code:</p>
<pre><code>
  public class JavaUser {
      // This is dangerous
      @Ann(s = FooKt.importantString)
      public void foo() {}
  }
</code></pre>
<p>To fix the problem replace the <code>@JvmField</code> annotation with the <code>const</code> modifier on a relevant Kotlin property or inline it.</p>
</body>
</html>
